bitkeeper revision 1.1159.212.9 (41dde2eagwOCuLzt_7mdSFXqA992dg)
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Fri, 7 Jan 2005 01:16:26 +0000 (01:16 +0000)
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>
Fri, 7 Jan 2005 01:16:26 +0000 (01:16 +0000)
VMX bug fixes - disable errant safety check.

xen/arch/x86/domain.c

index fc243373295f56abd2eba7e972ef39d863998f1c..5d86fd34e5e149a0320b620530321032af6a7979 100644 (file)
@@ -363,9 +363,10 @@ int arch_final_setup_guestos(struct exec_domain *d, full_execution_context_t *c)
      * #GP. If DS, ES, FS, GS are DPL 0 then they'll be cleared automatically.
      * If SS RPL or DPL differs from CS RPL then we'll #GP.
      */
-    if ( ((d->thread.user_ctxt.cs & 3) == 0) ||
-         ((d->thread.user_ctxt.ss & 3) == 0) )
-        return -EINVAL;
+    if (!(c->flags & ECF_VMX_GUEST)) 
+        if ( ((d->thread.user_ctxt.cs & 3) == 0) ||
+             ((d->thread.user_ctxt.ss & 3) == 0) )
+                return -EINVAL;
 
     memcpy(&d->thread.i387,
            &c->fpu_ctxt,
@@ -412,10 +413,8 @@ int arch_final_setup_guestos(struct exec_domain *d, full_execution_context_t *c)
         }
     }
 
-#ifdef CONFIG_VMX
     if (c->flags & ECF_VMX_GUEST)
         return vmx_final_setup_guestos(d, c);
-#endif
 
     return 0;
 }